using System;
using System.Collections;
using System.Collections.Generic;


namespace NanoERP.Model
{
    /// <summary>
    ///快递物流公司
    /// </summary>
    [Serializable]
    public sealed class Clientlogisticsinfo
    {
        #region Private Members

        // Variabili di stato
        private bool _isChanged;

        // Primary Key(s) 
        private long _id;

        // Properties 
        private string _clientname;
        private string _clientpym;
        private string _clientshortname;
        private string _address;
        private string _linkman;
        private string _linktel;
        private string _mobilephone;
        private string _fax;
        private string _email;
        private string _postcode;
        private string _bank;
        private string _accountno;
        private string _clienturl;
        private string _note;
        private string _exfield1;
        private string _exfield2;
        private string _exfield3;
        private string _exfield4;
        private decimal? _recmoney;
        private decimal? _paymoney;
        private decimal? _recmoneysum;
        private decimal? _paymoneysum;
        private int? _isvalid;
        private DateTime? _linkdate;
        private DateTime? _createdate;
        private long? _createuserid;
        private int? _tag;

        #endregion

        #region Default ( Empty ) Class Constructor

        /// <summary>
        /// default constructor
        /// </summary>
        public Clientlogisticsinfo()
        {
            _id = 0;
            _clientname = null;
            _clientpym = null;
            _clientshortname = null;
            _address = null;
            _linkman = null;
            _linktel = null;
            _mobilephone = null;
            _fax = null;
            _email = null;
            _postcode = null;
            _bank = null;
            _accountno = null;
            _clienturl = null;
            _note = null;
            _exfield1 = null;
            _exfield2 = null;
            _exfield3 = null;
            _exfield4 = null;
            _recmoney = null;
            _paymoney = null;
            _recmoneysum = null;
            _paymoneysum = null;
            _isvalid = 0;
            _linkdate = DateTime.Now;
            _createdate = DateTime.Now;
            _createuserid = null;
            _tag = null;
        }

        #endregion // End of Default ( Empty ) Class Constructor

        #region Full Constructor

        /// <summary>
        /// full constructor
        /// </summary>
        public Clientlogisticsinfo(long id, string clientname, string clientpym, string clientshortname, string address, string linkman, string linktel, string mobilephone, string fax, string email, string postcode, string bank, string accountno, string clienturl, string note, string exfield1, string exfield2, string exfield3, string exfield4, decimal? recmoney, decimal? paymoney, decimal? recmoneysum, decimal? paymoneysum, int? isvalid, DateTime? linkdate, DateTime? createdate, long? createuserid, int? tag)
        {
            _id = id;
            _clientname = clientname;
            _clientpym = clientpym;
            _clientshortname = clientshortname;
            _address = address;
            _linkman = linkman;
            _linktel = linktel;
            _mobilephone = mobilephone;
            _fax = fax;
            _email = email;
            _postcode = postcode;
            _bank = bank;
            _accountno = accountno;
            _clienturl = clienturl;
            _note = note;
            _exfield1 = exfield1;
            _exfield2 = exfield2;
            _exfield3 = exfield3;
            _exfield4 = exfield4;
            _recmoney = recmoney;
            _paymoney = paymoney;
            _recmoneysum = recmoneysum;
            _paymoneysum = paymoneysum;
            _isvalid = isvalid;
            _linkdate = linkdate;
            _createdate = createdate;
            _createuserid = createuserid;
            _tag = tag;
        }

        #endregion // End Full Constructor

        #region Public Properties

        /// <summary>
        /// [主键]主键
        /// </summary>		
        public long Id
        {
            get { return _id; }
            set { _isChanged |= (_id != value); _id = value; }
        }

        /// <summary>
        /// 公司名称
        /// </summary>		
        public string Clientname
        {
            get { return _clientname; }
            set
            {
                if (value != null)
                    if (value.Length > 300)
                        throw new ArgumentOutOfRangeException("Invalid value for Clientname", value, value.ToString());

                _isChanged |= (_clientname != value); _clientname = value;
            }
        }

        /// <summary>
        /// 拼音编码
        /// </summary>		
        public string Clientpym
        {
            get { return _clientpym; }
            set
            {
                if (value != null)
                    if (value.Length > 100)
                        throw new ArgumentOutOfRangeException("Invalid value for Clientpym", value, value.ToString());

                _isChanged |= (_clientpym != value); _clientpym = value;
            }
        }

        /// <summary>
        /// 公司简称
        /// </summary>		
        public string Clientshortname
        {
            get { return _clientshortname; }
            set
            {
                if (value != null)
                    if (value.Length > 100)
                        throw new ArgumentOutOfRangeException("Invalid value for Clientshortname", value, value.ToString());

                _isChanged |= (_clientshortname != value); _clientshortname = value;
            }
        }

        /// <summary>
        /// 单位地址
        /// </summary>		
        public string Address
        {
            get { return _address; }
            set
            {
                if (value != null)
                    if (value.Length > 300)
                        throw new ArgumentOutOfRangeException("Invalid value for Address", value, value.ToString());

                _isChanged |= (_address != value); _address = value;
            }
        }

        /// <summary>
        /// 联系人
        /// </summary>		
        public string Linkman
        {
            get { return _linkman; }
            set
            {
                if (value != null)
                    if (value.Length > 200)
                        throw new ArgumentOutOfRangeException("Invalid value for Linkman", value, value.ToString());

                _isChanged |= (_linkman != value); _linkman = value;
            }
        }

        /// <summary>
        /// 联系电话
        /// </summary>		
        public string Linktel
        {
            get { return _linktel; }
            set
            {
                if (value != null)
                    if (value.Length > 200)
                        throw new ArgumentOutOfRangeException("Invalid value for Linktel", value, value.ToString());

                _isChanged |= (_linktel != value); _linktel = value;
            }
        }

        /// <summary>
        /// 手机
        /// </summary>		
        public string Mobilephone
        {
            get { return _mobilephone; }
            set
            {
                if (value != null)
                    if (value.Length > 200)
                        throw new ArgumentOutOfRangeException("Invalid value for Mobilephone", value, value.ToString());

                _isChanged |= (_mobilephone != value); _mobilephone = value;
            }
        }

        /// <summary>
        /// 传真
        /// </summary>		
        public string Fax
        {
            get { return _fax; }
            set
            {
                if (value != null)
                    if (value.Length > 50)
                        throw new ArgumentOutOfRangeException("Invalid value for Fax", value, value.ToString());

                _isChanged |= (_fax != value); _fax = value;
            }
        }

        /// <summary>
        /// 电子邮箱
        /// </summary>		
        public string Email
        {
            get { return _email; }
            set
            {
                if (value != null)
                    if (value.Length > 50)
                        throw new ArgumentOutOfRangeException("Invalid value for Email", value, value.ToString());

                _isChanged |= (_email != value); _email = value;
            }
        }

        /// <summary>
        /// 邮政编码
        /// </summary>		
        public string Postcode
        {
            get { return _postcode; }
            set
            {
                if (value != null)
                    if (value.Length > 50)
                        throw new ArgumentOutOfRangeException("Invalid value for Postcode", value, value.ToString());

                _isChanged |= (_postcode != value); _postcode = value;
            }
        }

        /// <summary>
        /// 开户银行
        /// </summary>		
        public string Bank
        {
            get { return _bank; }
            set
            {
                if (value != null)
                    if (value.Length > 200)
                        throw new ArgumentOutOfRangeException("Invalid value for Bank", value, value.ToString());

                _isChanged |= (_bank != value); _bank = value;
            }
        }

        /// <summary>
        /// 开帐帐号
        /// </summary>		
        public string Accountno
        {
            get { return _accountno; }
            set
            {
                if (value != null)
                    if (value.Length > 50)
                        throw new ArgumentOutOfRangeException("Invalid value for Accountno", value, value.ToString());

                _isChanged |= (_accountno != value); _accountno = value;
            }
        }

        /// <summary>
        /// 公司网址
        /// </summary>		
        public string Clienturl
        {
            get { return _clienturl; }
            set
            {
                if (value != null)
                    if (value.Length > 500)
                        throw new ArgumentOutOfRangeException("Invalid value for Clienturl", value, value.ToString());

                _isChanged |= (_clienturl != value); _clienturl = value;
            }
        }

        /// <summary>
        /// 备注
        /// </summary>		
        public string Note
        {
            get { return _note; }
            set
            {
                if (value != null)
                    if (value.Length > 2000)
                        throw new ArgumentOutOfRangeException("Invalid value for Note", value, value.ToString());

                _isChanged |= (_note != value); _note = value;
            }
        }

        /// <summary>
        /// EXFIELD1
        /// </summary>		
        public string Exfield1
        {
            get { return _exfield1; }
            set
            {
                if (value != null)
                    if (value.Length > 100)
                        throw new ArgumentOutOfRangeException("Invalid value for Exfield1", value, value.ToString());

                _isChanged |= (_exfield1 != value); _exfield1 = value;
            }
        }

        /// <summary>
        /// EXFIELD2
        /// </summary>		
        public string Exfield2
        {
            get { return _exfield2; }
            set
            {
                if (value != null)
                    if (value.Length > 100)
                        throw new ArgumentOutOfRangeException("Invalid value for Exfield2", value, value.ToString());

                _isChanged |= (_exfield2 != value); _exfield2 = value;
            }
        }

        /// <summary>
        /// EXFIELD3
        /// </summary>		
        public string Exfield3
        {
            get { return _exfield3; }
            set
            {
                if (value != null)
                    if (value.Length > 100)
                        throw new ArgumentOutOfRangeException("Invalid value for Exfield3", value, value.ToString());

                _isChanged |= (_exfield3 != value); _exfield3 = value;
            }
        }

        /// <summary>
        /// EXFIELD4
        /// </summary>		
        public string Exfield4
        {
            get { return _exfield4; }
            set
            {
                if (value != null)
                    if (value.Length > 100)
                        throw new ArgumentOutOfRangeException("Invalid value for Exfield4", value, value.ToString());

                _isChanged |= (_exfield4 != value); _exfield4 = value;
            }
        }

        /// <summary>
        /// 期初应收款
        /// </summary>		
        public decimal? Recmoney
        {
            get { return _recmoney; }
            set { _isChanged |= (_recmoney != value); _recmoney = value; }
        }

        /// <summary>
        /// 期初应付款
        /// </summary>		
        public decimal? Paymoney
        {
            get { return _paymoney; }
            set { _isChanged |= (_paymoney != value); _paymoney = value; }
        }

        /// <summary>
        /// 累计应收款
        /// </summary>		
        public decimal? Recmoneysum
        {
            get { return _recmoneysum; }
            set { _isChanged |= (_recmoneysum != value); _recmoneysum = value; }
        }

        /// <summary>
        /// 累计应付款
        /// </summary>		
        public decimal? Paymoneysum
        {
            get { return _paymoneysum; }
            set { _isChanged |= (_paymoneysum != value); _paymoneysum = value; }
        }

        /// <summary>
        /// 是否无效 0有效，1-无效
        /// </summary>		
        public int? Isvalid
        {
            get { return _isvalid; }
            set { _isChanged |= (_isvalid != value); _isvalid = value; }
        }

        /// <summary>
        /// 联系时间
        /// </summary>		
        public DateTime? Linkdate
        {
            get { return _linkdate; }
            set { _isChanged |= (_linkdate != value); _linkdate = value; }
        }

        /// <summary>
        /// 创建日期
        /// </summary>		
        public DateTime? Createdate
        {
            get { return _createdate; }
            set { _isChanged |= (_createdate != value); _createdate = value; }
        }

        /// <summary>
        /// 创建人编号
        /// </summary>		
        public long? Createuserid
        {
            get { return _createuserid; }
            set { _isChanged |= (_createuserid != value); _createuserid = value; }
        }

        /// <summary>
        /// 显示顺序
        /// </summary>		
        public int? Tag
        {
            get { return _tag; }
            set { _isChanged |= (_tag != value); _tag = value; }
        }

        #endregion


    }
}